<c:if test="#{not empty widgetProperty_action}"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:c="http://java.sun.com/jstl/core">

<nxu:set var="actionStyleClass"
  value="#{widgetProperty_actionStyleClass}"
  cache="true">
<nxu:set var="action" value="#{widgetProperty_action}"
  cache="true">
<nxu:set var="idPrefix" value="#{widget.id}_"
  cache="true">
<nxu:set var="clickedActionIdHolder" value="#{idPrefix}clickedActionIdHolder"
  cache="true">
<nxu:set var="actionsPanelId" value="#{widget.id}_panel"
  cache="true">
<nxu:set var="ajaxReRender" value="#{nxu:joinRender(actionsPanelId, widgetProperty_ajaxReRender)}">
<nxu:set var="formAdded" value="#{widgetProperty_addForm}" cache="true">
  <nxu:valueHolder id="#{clickedActionIdHolder}"
    skip="#{!widgetProperty_trackCurrentAction}"
    var="clickedActionId">

    <a4j:outputPanel id="#{actionsPanelId}" layout="block"
      styleClass="#{widgetProperty_styleClass}">

      <ui:decorate template="/incl/action/generic_action_template.xhtml">
        <ui:param name="useButton" value="#{widgetProperty_actionsDisplay == 'buttons'}" />
        <ui:param name="hideLabel" value="#{widgetProperty_actionsDisplay == 'icons'}" />
        <ui:param name="hideIcon" value="#{widgetProperty_actionsDisplay == 'buttons' or widgetProperty_actionsDisplay == 'links'}" />
        <ui:param name="addForm" value="#{widgetProperty_addForm}" />
        <ui:param name="useAjaxForm" value="#{widgetProperty_useAjaxForm}" />
        <ui:param name="formStyleClass" value="displayI subWidgetForm" />
        <ui:param name="mode" value="#{widget.mode}" />
        <ui:param name="disableFiltered" value="#{widgetProperty_disableFiltered}" />
      </ui:decorate>

      <ui:include src="/incl/action/generic_mode_action_template.xhtml">
        <ui:param name="mode" value="after_view" />
      </ui:include>

    </a4j:outputPanel>

  </nxu:valueHolder>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>

</c:if>